#include<stdio.h>
#include<string.h>


int main()
{
    char* filename = "bite";
    FILE* f1 = fopen(filename,"w");

    char* str = "linux so easy!\n";
    fwrite(str,sizeof(char),strlen(str),f1);
    fclose(f1);

    fopen(filename,"r");
    char read[1024];
    int size = fread(read,sizeof(char),sizeof(read),f1);
    printf("size:%d\n",size);
    printf("%s\n",read);

    fseek(f1,6*sizeof(char),SEEK_SET);


    size = fread(read,sizeof(char),sizeof(read),f1);
    read[size] = '\0';
    printf("size:%d\n",size);
    printf("%s\n",read);
    fclose(f1);

    return 0;
}